<?php
	$_GET['tblname'] = 'shop_goods';
	$_GET['pk'] = 'gid';
	
	require './model/db_cfg.php';
	require './model/db.php';
	
	//
	function getTypeInfo(){
		$_GET['tblname'] = 'shop_type';//
		$_GET['pk'] = 'tid';      
		$link = connect();
		$sql = 'SELECT *,CONCAT(path,tid) npath FROM shop_type ORDER BY npath';
		$ret = mysqli_query($link,$sql);
		if($ret){
			if(mysqli_num_rows($ret)>0){
				return mysqli_fetch_all($ret,MYSQLI_ASSOC);
			}else{
				return false;
			}
		}else{
			die($sql.'<br />'.mysqli_error($link));
		}
	}
	